<template>
	<view>
		<view class="head">
			<view class="head_left" @tap="back()">
				<image src="../../../static/wode/return.png" mode=""></image>
				<text>返回</text>
			</view>
			<view class="head_mid">
				绑定手机号
			</view>
			<view class="head_right">
				
			</view>
		</view>
		<view class="body_item" v-if="type=='phone'">
			您的手机号：{{mobile}}
		</view>
		<view class="body_item" v-else>
			您的邮箱号：{{email}}
		</view>
		<view class="body_bottom btn" @tap="toChengeNumber('phone')" v-if="type=='phone'">
			更换手机号
		</view>
		<view class="body_bottom btn" @tap="toChengeNumber('email')" v-else>
			更换邮箱号
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				mobile:'',
				email:'',
				type:'',
				
			};
		},
		onLoad(option) {
			this.type=option.type
		},
		onShow() {
			var user_info=uni.getStorageSync('user_info');
			this.mobile=user_info.mobile;
			this.email=user_info.mail;
			console.log(this.mobile)
		},
		methods: {
			toChengeNumber(type) {
				uni.navigateTo({
					url:"../changeNumber/changeNumber?type="+type
				})
			},
			back() { //返回
				uni.navigateBack({
					delta: 1
				})
			},
		},
	}
</script>

<style scoped>
.head {
			width: 100%;
			display: flex;
			justify-content: space-between;
			height: 162upx;
			background: #ffffff;
			padding: 0 24upx;
			z-index: 200;
		}
	
		.head image {
			width: 20upx;
			height: 36upx;
			margin-right: 9upx;
		}
	
		.head_left {
			height: 82upx;
			width: 106upx;
			display: flex;
			align-items: center;
			line-height: 82upx;
			color: #666666;
			font-size: 32upx;
			padding-top: 70upx;
		}
		.head_mid{
			padding-top: 90upx;
		}
		.head_right{
			width: 150upx;
		}
		.body_item{
			width: 100%;
			height:200upx;
			text-align: center;
			line-height: 160upx;
			font-size: 32upx;
		}
		.body_bottom{
			position: absolute;
			top:300upx ;
			left: 24upx;
		}
		
</style>
